package com.bbs.exception;

import com.bbs.utils.Constants;
import lombok.Data;

@Data
public class BusinessException extends RuntimeException{
    private String code;

    public BusinessException(){
        super(Constants.FAILURE_MESSAGE);
        this.code = Constants.FAILURE_CODE;
    }

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }

    public BusinessException(String message, String code) {
        super(message);
        this.code = code;
    }

    public BusinessException(String message, String code, Throwable cause) {
        super(message, cause);
        this.code = code;
    }
}
